<form action="index" method="POST" autocomplete="off" name="form">
<div><?php
	$arrConst = $this->arrConst;
	$arrRecordType = $this->arrRecordType;
	$arrGroupRecord = $this->arrGroupRecord;
	?>
	<!--Cac doi tuong hidden tren form-->
	<?php echo $this->formHidden("hdn_object_id_list","",null); ?>
	<?php echo $this->formHidden("hdn_filter_xml_tag_list",$this->filterXmlTagList,null); ?>
	<?php echo $this->formHidden("hdn_filter_xml_value_list",$this->filterXmlValueList,null); ?>
	<?php echo $this->formHidden("hdn_record_number_page",$this->numRowOnPage,null); ?>	
	<?php echo $this->formHidden("hdn_object_id","",null); ?>
	<?php echo $this->formHidden("hdn_XmlTagValueList",$this->XmlTagValueList,null); ?>	
	<!--Bien hdn_deleted_exist_file_id_list dung de ...-->	
	<?php echo $this->formHidden("hdn_deleted_exist_file_id_list","",null); ?>	
	<div class = "searh-fixed">
		<div class = "normal_title">
			<?=$this->bodyTitle;?>
		</div>	
		<div class="search-container">	
			<div id = "contentXml" style="border:none;">
				<select  id="C_GROUP_RECORD" name="C_GROUP_RECORD"  option = "false"  style="width:25%;" class="textbox"  message="<?php echo "Phải xác định lĩnh vực";?>" onchange="actionUrl('');" >
					<option id="" name = "" value="">-- Chọn nhóm loại TTHC --</option>
					<?php echo Efy_Library::_generateSelectOption($arrGroupRecord,'C_CODE','C_CODE','C_NAME',$this->sGroupRecordType);?>
				</select>
				<input type="text" id="sFullTextSearch" name="sFullTextSearch"  autocomplete="off" class="textbox" size="99%" value="<?= $this->sFullTextSearch ?>">
			</div>
		</div>
		<div class = "button-link-container" align = "right">
			<div class = "blc-left">
				<input type="button" value="Tìm kiếm" class="link-button"  onchange="handler(event)" onclick="actionUrl('');">
			</div>
			<div class = "blc-right">
				<input id="btn_add" name="btn_add" type="button" class="link-button" value="<?= $arrConst['_THEM']?>" onclick="actionUrl('../add/');">
				<input type="button" class="link-button" value="<?= $arrConst['_SUA']?>" onclick="btn_update_onclick(document.getElementsByName('chk_item_id'),'../edit/');">
				<input type="button" class="link-button" value="<?=$arrConst['_XOA']?>" onclick="btn_delete_recordtype(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../delete/');">
				<!-- <input type="button" class="link-button" value="<?=$arrConst['_QUYEN_GQ_LOAI_HS']?>" onclick="btn_set_permission_recordtype(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../setpermisstion/');"> -->
				<input type="button" class="link-button" value="Xuất Xml" onclick="actionUrl('../xml/');">
			</div>
		</div>
	</div>
	<div id = "table-container">
		<table cellpadding="0" cellspacing="0" border="0" align="center" class="list-table-data" id="table1">
			<?php			
			$delimitor = $this->delimitor;//Lay ky tu phan cach giua cac phan tu
			//Hien thi cac cot cua bang hien thi du lieu
				$StrHeader = explode("!~~!", Efy_Library::_GenerateHeaderTable("3%" . $delimitor . "15%" . $delimitor . "57%" . $delimitor . "10%" . $delimitor . "15%"
												,'<input type="checkbox" name="chk_all_item_id"  onclick="checkbox_all_item_id(document.forms[0].chk_item_id);">' . $delimitor . "Mã hồ sơ" . $delimitor . "Tên hồ sơ" . $delimitor  . "Thứ tự" . $delimitor . "Trạng thái"
												,$delimitor));
			echo $StrHeader[0];				
			echo $StrHeader[1]; //Hien thi <col width = 'xx'><...		
			//Dinh nghia URL
			$sUrView  = "../view/";
			$sCurrentStyleName = "round_row";	
			for($index = 0;$index < sizeof($arrRecordType) ;$index++){
				$sPk						= $arrRecordType[$index]['PK_RECORDTYPE'];				
				$sCode						= Efy_Function_RecordFunctions::searchStringColor($this->sFullTextSearch,$arrRecordType[$index]['C_CODE']).'&nbsp;';					
				$sName 						= Efy_Function_RecordFunctions::searchStringColor($this->sFullTextSearch,$arrRecordType[$index]['C_NAME']).'&nbsp;';
				$sStatus		 			= $arrRecordType[$index]['C_STATUS'];
				$iOrder		 				= $arrRecordType[$index]['C_ORDER'];
				If($sStatus == "HOAT_DONG"){
					$sStatus = "Hoạt động";
				}else{
					$sStatus = "Không hoạt động";
				}
				if ($sCurrentStyleName == "odd_row"){
					$sCurrentStyleName = "round_row";
				}else{
					$sCurrentStyleName = "odd_row";					
				}?>					
				<tr class="<?=$sCurrentStyleName?>">	
					<td align="center" style="padding-left:3px;padding-right:3px;" class="normal_label">					
						<?=$this->formCheckbox('chk_item_id',$sPk, array('checked' => false,'onclick' =>'selectrow(this)'));?>					
					</td>																
					<td align="center"   ondblclick="item_onclick('<?=$sPk?>','../edit/')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sPk?>');"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sCode ?></td>						
					<td align="left"  ondblclick="item_onclick('<?=$sPk?>','../edit/')"  onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sPk?>');"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sName?></td>
					<td align="center"  ondblclick="item_onclick('<?=$sPk?>','../edit/')"  onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sPk?>');"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$iOrder?></td>
					<td align="center" ondblclick="item_onclick('<?=$sPk?>','../edit/')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sPk?>');"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sStatus ?></td>	
				</tr><?php
			}					
			//Tu dien cac dong trang trong truong hop du lieu tra ve < so row _CONST_NUMBER_OF_ROW_PER_LIST	
				echo Efy_Library::_addEmptyRow($this->iCountElement,15 -sizeof($arrRecordType),$sCurrentStyleName,5);
			?>
		</table>	
        <!--Hien thi trang can xem!-->			
        <table width="98%" cellpadding="0" cellspacing="0" border="0">		
                <tr>
                    <td style="padding-left:0px;padding-right:8px;">
                        <?=$this->SelectDeselectAll;?>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="font-size:13px; padding-right:8px; font:tahoma" class="normal_label"><?php		
                        echo $this->generateHtmlSelectBoxPage;?>
                    </td>
                </tr>		
        </table>
	</div>
    <div class = "button-container">
		<input id="btn_add" name="btn_add" type="button" class="link-button" value="<?= $arrConst['_THEM']?>" onclick="actionUrl('../add/');">
		<input type="button" class="link-button" value="<?= $arrConst['_SUA']?>" onclick="btn_update_onclick(document.getElementsByName('chk_item_id'),'../edit/');">
		<input type="button" class="link-button" value="<?=$arrConst['_XOA']?>" onclick="btn_delete_recordtype(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../delete/');">
		<!-- <input type="button" class="link-button" value="<?=$arrConst['_QUYEN_GQ_LOAI_HS']?>" onclick="btn_set_permission_recordtype(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../setpermisstion/');"> -->
		<input type="button" class="link-button" value="Xuất Xml" onclick="actionUrl('../xml/');">
	</div>
    <div>&nbsp;</div>
</div>
</form>
<script type="text/javascript">
var keyEnter="13";
var x='';	
function handler(e){
	//IE return :event.keyCode; FF return : e.which;
	var  x=(window.event)?event.keyCode:e.which; 
	if (x==13){	//Enter					
				document.getElementsByTagName('form')[0].action = '';
				document.getElementsByTagName('form')[0].submit();
	}
}	
if (!document.all){
	window.captureEvents(Event.KEYPRESS);
	window.onkeypress=handler;
}else{
	document.onkeypress = handler;
} 	
</script>


